package com.flying.invest.summary.model;

import java.util.Date;

import com.flying.framework.data.Data;
import com.flying.common.util.Codes;
import com.flying.framework.annotation.ConstantEnum;
import com.flying.framework.annotation.Param;
import com.flying.framework.data.DataSerializable;
import com.flying.framework.metadata.Meta;

@SuppressWarnings("serial")
@Meta(id="i_summary_money_daily",title="", table="i_summary_money_daily", primaryKeys={"summary_id"})
public class SummaryMoneyDaily extends Data implements DataSerializable,ISummary {
	public final static String ENTITY_NAME = "i_summary_money_daily";
	
	public final static String SUMMARY_ID = "summary_id";
	public final static String USER_ID = "user_id";
	public final static String TYPE_ID = "type_id";
	public final static String MARKET_ID = "market_id";
	public final static String BLOCK_ID = "block_id";
	public final static String SUM_FROM_DATE = "sum_from_date";
	public final static String SUM_DATE = "sum_date";
	public final static String SUMMARY_DATE = "summary_date";
	public final static String TOTAL_COST = "total_cost";
	public final static String TOTAL_TAX = "total_tax";
	public final static String PERIOD_INIT_AMOUNT = "period_init_amount";
	public final static String PERIOD_BUY_AMOUNT = "period_buy_amount";
	public final static String PERIOD_BUY_COUNT = "period_buy_count";
	public final static String PERIOD_SELL_AMOUNT = "period_sell_amount";
	public final static String PERIOD_SELL_COUNT = "period_sell_count";
	public final static String TOTAL_AMOUNT = "total_amount";
	public final static String TOTAL_PROFIT = "total_profit";
	public final static String PERIOD_PROFIT = "period_profit";
	public final static String CURRENCY = "currency";
	public final static String CURRENCY_RATE = "currency_rate";
	public final static String CREATE_TIME = "create_time";
	public final static String SUMMARY_TYPE = "summary_type";
	
	public enum SummaryType implements ConstantEnum<Integer> {
		DAILY(0, "日报"), WEEKLY(1, "周报"), MONTHLY(2, "月报"), YEARLY(3, "年报");

		public final int value;
		public final String remarks;

		SummaryType(int value, String remarks) {
			this.value = value;
			this.remarks = remarks;
		}
		
		@Override
		public Integer value() {
			return this.value;
		}

		@Override
		public String text() {
			return remarks;
		}
	}
	
	@Param(value=SUMMARY_ID,   required=true,   maxlength=0,	desc="ID" , generator=Codes.AUTO_INCREMENT)
	private Long summaryId;
	
	@Param(value=USER_ID,   required=true,   maxlength=0,	desc="用户ID" )
	private Long userId;
	
	@Param(value=TYPE_ID,   required=true,   maxlength=0,	desc="类型ID" )
	private Long typeId;
	
	@Param(value=MARKET_ID,   required=false,   maxlength=0,	desc="市场ID" )
	private Long marketId;
	
	@Param(value=BLOCK_ID,   required=false,   maxlength=0,	desc="板块ID" )
	private Long blockId;
	
	@Param(value=SUM_FROM_DATE,   required=false,   maxlength=10,	desc="起始日期" )
	private String sumFromDate;
	
	@Param(value=SUM_DATE,   required=false,   maxlength=10,	desc="截止日期" )
	private String sumDate;
	
	@Param(value=SUMMARY_DATE,   required=true,   maxlength=0,	desc="汇总日期" )
	private Date summaryDate;
	
	@Param(value=TOTAL_COST,   required=false,   maxlength=0,	desc="总成本" )
	private Double totalCost;
	
	@Param(value=TOTAL_TAX,   required=false,   maxlength=0,	desc="总税额" )
	private Double totalTax;
	
	@Param(value=PERIOD_INIT_AMOUNT,   required=false,   maxlength=0,	desc="期初市值" )
	private Double periodInitAmount;
	
	@Param(value=PERIOD_BUY_AMOUNT,   required=false,   maxlength=0,	desc="买入金额" )
	private Double periodBuyAmount;
	
	@Param(value=PERIOD_BUY_COUNT,   required=false,   maxlength=0,	desc="买入笔数" )
	private Integer periodBuyCount;
	
	@Param(value=PERIOD_SELL_AMOUNT,   required=false,   maxlength=0,	desc="卖出金额" )
	private Double periodSellAmount;
	
	@Param(value=PERIOD_SELL_COUNT,   required=false,   maxlength=0,	desc="卖出笔数" )
	private Integer periodSellCount;
	
	@Param(value=TOTAL_AMOUNT,   required=false,   maxlength=0,	desc="期末市值" )
	private Double totalAmount;
	
	@Param(value=TOTAL_PROFIT,   required=false,   maxlength=0,	desc="总利润" )
	private Double totalProfit;
	
	@Param(value=PERIOD_PROFIT,   required=false,   maxlength=0,	desc="当期利润" )
	private Double periodProfit;
	
	@Param(value=CURRENCY,   required=false,   maxlength=10,	desc="币种" )
	private String currency;
	
	@Param(value=CURRENCY_RATE,   required=false,   maxlength=0,	desc="汇率" )
	private Double currencyRate;
	
	@Param(value=CREATE_TIME,   required=false,   maxlength=0,	desc="创建时间" )
	private Date createTime;
	
	@Param(value=SUMMARY_TYPE,   required=false,   maxlength=0,	desc="汇总类型", enumClass=SummaryType.class )
	private Integer summaryType;
	
	
	public Long getSummaryId() {
		return this.summaryId;
	}
	
	public void setSummaryId(Long summaryId) {
		this.summaryId = summaryId;
	}
	
	public Long getUserId() {
		return this.userId;
	}
	
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	
	public Long getTypeId() {
		return this.typeId;
	}
	
	public void setTypeId(Long typeId) {
		this.typeId = typeId;
	}
	
	public Long getMarketId() {
		return this.marketId;
	}
	
	public void setMarketId(Long marketId) {
		this.marketId = marketId;
	}
	
	public Long getBlockId() {
		return this.blockId;
	}
	
	public void setBlockId(Long blockId) {
		this.blockId = blockId;
	}
	
	public String getSumFromDate() {
		return this.sumFromDate;
	}
	
	public void setSumFromDate(String sumFromDate) {
		this.sumFromDate = sumFromDate;
	}
	
	public String getSumDate() {
		return this.sumDate;
	}
	
	public void setSumDate(String sumDate) {
		this.sumDate = sumDate;
	}
	
	public Date getSummaryDate() {
		return this.summaryDate;
	}
	
	public void setSummaryDate(Date summaryDate) {
		this.summaryDate = summaryDate;
	}
	
	public Double getTotalCost() {
		return this.totalCost;
	}
	
	public void setTotalCost(Double totalCost) {
		this.totalCost = totalCost;
	}
	
	public Double getTotalTax() {
		return this.totalTax;
	}
	
	public void setTotalTax(Double totalTax) {
		this.totalTax = totalTax;
	}
	
	public Double getPeriodInitAmount() {
		return this.periodInitAmount;
	}
	
	public void setPeriodInitAmount(Double periodInitAmount) {
		this.periodInitAmount = periodInitAmount;
	}
	
	public Double getPeriodBuyAmount() {
		return this.periodBuyAmount;
	}
	
	public void setPeriodBuyAmount(Double periodBuyAmount) {
		this.periodBuyAmount = periodBuyAmount;
	}
	
	public Integer getPeriodBuyCount() {
		return this.periodBuyCount;
	}
	
	public void setPeriodBuyCount(Integer periodBuyQuantity) {
		this.periodBuyCount = periodBuyQuantity;
	}
	
	public Double getPeriodSellAmount() {
		return this.periodSellAmount;
	}
	
	public void setPeriodSellAmount(Double periodSellAmount) {
		this.periodSellAmount = periodSellAmount;
	}
	
	public Integer getPeriodSellCount() {
		return this.periodSellCount;
	}
	
	public void setPeriodSellCount(Integer periodSellQuantity) {
		this.periodSellCount = periodSellQuantity;
	}
	
	public Double getTotalAmount() {
		return this.totalAmount;
	}
	
	public void setTotalAmount(Double totalAmount) {
		this.totalAmount = totalAmount;
	}
	
	public Double getTotalProfit() {
		return this.totalProfit;
	}
	
	public void setTotalProfit(Double totalProfit) {
		this.totalProfit = totalProfit;
	}
	
	public Double getPeriodProfit() {
		return this.periodProfit;
	}
	
	public void setPeriodProfit(Double periodProfit) {
		this.periodProfit = periodProfit;
	}
	
	public String getCurrency() {
		return this.currency;
	}
	
	public void setCurrency(String currency) {
		this.currency = currency;
	}
	
	public Double getCurrencyRate() {
		return this.currencyRate;
	}
	
	public void setCurrencyRate(Double currencyRate) {
		this.currencyRate = currencyRate;
	}
	
	public Date getCreateTime() {
		return this.createTime;
	}
	
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public Integer getSummaryType() {
		return this.summaryType;
	}
	
	public void setSummaryType(Integer summaryType) {
		this.summaryType = summaryType;
	}
}